<?php
namespace Home\Common;

class PropGetLog extends Mysql{
	//物品获得
	function getPropGetLog($serverid){
		$serverid	=	session('mog_serverid');
		$date		=	session('mog_thedate');
		
		$result		=	$this->mysql->prepare("select a.serverid,a.propid,b.propname,count(distinct(a.userid)) ,count(a.userid) 
		from mog_prop_get a inner join mog_prop_info  b on a.propid=b.propid 
		where a.date = \"$date\" and a.serverid=\"$serverid\" 
		group by a.propid;)");
		$result->execute();
		
		$arResult	=	array();
		while($row	=	$result->fetch(\PDO::FETCH_ASSOC)){
			array_push($arResult,array($row['propid'],$row['propname'],$row['count(distinct(a.userid))'],$row['count(a.userid)']));
		}
		
		return $arResult;
	}
}